import router from './router'
// import { getXmStorage } from '@/utils'
 
// const whiteList = ['/login'] // 无token白名单
const legalRouter = ['/index', '/prepareTopup', '/searchRecord'] // 合法路由

router.beforeEach((to, from, next) => {
  // console.log('to, from, next', to, from, next)
  // console.log('初始拿到的参数', to.query)
  if (legalRouter.includes(to.path)) {
    next()
  } else {
    next(`/index`)
  }
})
export default router;
